<!DOCTYPE html>
<html>
<head>
    <title>
        <%= uname %>的日记本
    </title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="stylesheet" href="/stylesheets/message.css">
    <script src="/javascripts/axios.min.js"></script>
    <script src="/javascripts/jquery.min.js"></script>
    <style>
        * {
            padding: 0;
            margin: 0;
        }
        li {
            list-style: none;
        }
        body {
            background-color: white;
        }
        .container {
            width: 960px;
            height: 500px;
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            border-radius: 10px;
            background-color: rgb(233, 233, 233);
            padding: 15px 15px 0px 15px;
            box-shadow: rgba(0, 0, 0, 0.4) 0px 2px 4px, rgba(0, 0, 0, 0.3) 0px 7px 13px -3px, rgba(0, 0, 0, 0.2) 0px -3px 0px inset;
        }
        .left-container {
            box-sizing: border-box;
            display: inline-block;
            width: 220px;
            height: 490px;
            border-top-left-radius: 15px;
            border-top-right-radius: 15px;
            padding-bottom: 0;
            box-shadow: rgba(0, 0, 0, 0.1) 0px 1px 3px 0px, rgba(0, 0, 0, 0.06) 0px 1px 2px 0px;
            background-color: rgb(255, 255, 255);
            border-radius: 15px;
        }
        .left-top {
            position: relative;
            box-sizing: border-box;
            background-color: rgb(255, 255, 255);
            border-radius: 15px 15px 0 0;
            padding: 10px;
        }
        .left-top-title,
        .center-bottom-title {
            font-size: 24px;
            font-family: 'YouYuan';
            font-weight: bold;
        }
        .ninfo-box-notenum {
            display: inline-block;
            text-align: center;
            font-size: 10px;
            margin-top: 10px;
            margin-left: 20px;
            color: rgb(122, 122, 122);
        }
        .ninfo-box-newnote {
            position: absolute;
            margin-left: 100px;
            margin-top: -30px;
        }
        .ninfo-box-newnote:hover {
            cursor: pointer;
            transform: scale(1.2) rotate(-90deg);
            transition: all ease-in-out .2s;
        }
        .list-wrapper {
            position: absolute;
            box-sizing: border-box;
            background-color: rgb(233, 233, 233);
            width: 220px;
            margin-top: 10px;
            height: 380px;
            overflow-y: scroll;
        }
        .noteli {
            position: relative;
            border-radius: 1px;
            margin-bottom: 1px;
            box-sizing: border-box;
            padding: 15px;
            width: auto;
            height: 80px;
            background-color: rgb(255, 255, 255);
            overflow: hidden;
        }
        .noteli:hover {
            cursor: pointer;
            background-color: rgb(228, 228, 228);
        }
        .noteli .li-title,
        .li-date {
            position: absolute;
            font-family: 'PMingLiu';
        }
        .noteli .li-title {
            font-size: 16px;
        }
        .noteli .li-date {
            position: absolute;
            font-size: 8px;
            color: rgb(165, 165, 165);
            margin-top: 35px;
        }
        .center-container {
            box-sizing: border-box;
            display: inline-block;
            position: absolute;
            width: 210px;
            height: 490px;
            padding: 0 5px;
            margin-left: 5px;
        }
        .center-top {
            display: flex;
            justify-content: space-between;
            align-items: center;
            flex-direction: column;
            box-sizing: border-box;
            position: absolute;
            width: 200px;
            height: 120px;
            background-color: rgb(255, 255, 255);
            border-radius: 15px;
            padding: 25px;
            box-shadow: rgba(0, 0, 0, 0.1) 0px 1px 3px 0px, rgba(0, 0, 0, 0.06) 0px 1px 2px 0px;
        }
        .center-top-uname {
            display: block;
            margin-bottom: 15px;
            margin-top: -15px;
            font-family: 'YouYuan';
            font-weight: bold;
            font-size: 16px;
            text-align: center;
            width: 100%;
        }
        .center-top-uid {
            display: none;
        }
        .logoutBtn,
        .aboutBtn {
            font-family: 'YouYuan';
            font-size: 14px;
            font-weight: 500;
            vertical-align: 65%;
            text-decoration: none;
        }
        .logoutBtn:hover,
        .aboutBtn:hover {
            cursor: pointer;
            color: rgb(234, 144, 26);
        }
        .center-bottom {
            box-sizing: border-box;
            position: absolute;
            width: 200px;
            height: 340px;
            background-color: rgb(255, 255, 255);
            border-radius: 15px;
            padding: 25px;
            margin-top: 150px;
            box-shadow: rgba(0, 0, 0, 0.1) 0px 1px 3px 0px, rgba(0, 0, 0, 0.06) 0px 1px 2px 0px;
        }
        .center-bottom-title {
            margin-top: -10px;
            margin-left: -15px;
        }
        .tinfo-box {
            margin-left: -15px;
        }
        .tinfo-box-newtodo {
            position: absolute;
            margin-left: 80px;
            margin-top: -35px;
        }
        .tinfo-box-newtodo:hover {
            cursor: pointer;
            transform: scale(1.2) rotate(-90deg);
            transition: all ease-in-out .2s;
        }
        .tinfo-box-todonum {
            display: inline-block;
            text-align: center;
            font-size: 10px;
            margin-top: 10px;
            margin-left: 20px;
            color: rgb(122, 122, 122);
        }
        .tinfo-box-todotext {
            position: absolute;
            width: 0;
            height: 50px;
            padding: 5px;
            background-color: rgb(233, 233, 233);
            border-radius: 15px;
            box-shadow: rgba(50, 50, 93, 0.25) 0px 6px 12px -2px, rgba(0, 0, 0, 0.3) 0px 3px 7px -3px;
            outline: 0;
            border-style: none;
            text-indent: 1.2em;
            font-size: 18px;
            font-family: 'YouYuan', 'Helvetica Neue';
            z-index: 1;
            margin-left: 175px;
            margin-top: -75px;
        }
        .btn-box {
            display: flex;
            flex-direction: column;
            justify-content: space-around;
            align-items: center;
            width: 190px;
            height: 180px;
            margin-top: 20px;
            margin-left: -20px;
        }
        .doneBtn {
            display: block;
            display: flex;
            background-color: rgb(233, 233, 233);
            align-items: center;
            width: 180px;
            height: 60px;
            border-radius: 15px;
        }
        .updoneBtn {
            display: block;
            display: flex;
            background-color: rgb(233, 233, 233);
            align-items: center;
            width: 180px;
            height: 60px;
            border-radius: 15px;
        }
        .doneBtn div,
        .updoneBtn div {
            display: inline-block;
            font-family: 'YouYuan';
            font-weight: bold;
        }
        .doneBtn:hover,
        .updoneBtn:hover {
            cursor: pointer;
            transform: scale(1.05);
            transition-duration: .2s;
            box-shadow: rgba(50, 50, 93, 0.25) 0px 6px 12px -2px, rgba(0, 0, 0, 0.3) 0px 3px 7px -3px;
        }
        .right-container {
            box-sizing: border-box;
            display: inline-block;
            position: absolute;
            width: 520px;
            height: 490px;
            background-color: rgb(255, 255, 255);
            border-radius: 15px;
            margin-left: 220px;
            padding: 25px;
            box-shadow: rgba(0, 0, 0, 0.1) 0px 1px 3px 0px, rgba(0, 0, 0, 0.06) 0px 1px 2px 0px;
        }
        .right-container header {
            box-sizing: border-box;
            border-bottom: 2px solid grey;
            padding: 10px;
            margin-top: -20px;
        }
        .right-container header .setcolor {
            display: inline-block;
            border-right: 2px solid grey;
            padding-right: 15px;
            margin-right: 20px;
        }
        .todo-container {
            box-sizing: border-box;
            display: none;
            position: absolute;
            width: 520px;
            height: 490px;
            background-image: url(../images/m3.jpg);
            border-radius: 15px;
            margin-left: 220px;
            padding: 25px;
            box-shadow: rgba(0, 0, 0, 0.1) 0px 1px 3px 0px, rgba(0, 0, 0, 0.06) 0px 1px 2px 0px;
            overflow-y: auto;
            overflow-x: hidden;
        }
        .tdli-box {
            display: flex;
            align-items: center;
            justify-content: space-around;
            width: 460px;
            height: 50px;
            padding: 5px;
            backdrop-filter: blur(5px);
            border-radius: 15px;
            box-shadow: rgba(50, 50, 93, 0.25) 0px 6px 12px -2px, rgba(0, 0, 0, 0.3) 0px 3px 7px -3px;
            cursor: pointer;
            margin-top: 10px;
        }
        .tdli-box:hover {
            transform: scale(1.05);
            transition-duration: .2s;
            backdrop-filter: blur(0);
        }
        .tdli {
            width: 400px;
            height: 30px;
            border-radius: .3rem;
            overflow: hidden;
            line-height: 30px;
            text-indent: 0.5rem;
        }
        .delete-todo {
            opacity: 0;
        }
        .tdli-box:hover .delete-todo {
            opacity: 1;
            transition-duration: .2s;
        }
        .tdradio {
            width: 20px;
            height: 20px;
            background-color: transparent;
        }
        .tdradio:hover {
            border: 1px solid rgb(3, 79, 111);
        }
        div[data-isSelect] {
            width: 20px;
            height: 20px;
            border: 1px solid rgb(85, 196, 247);
            background-color: rgb(3, 79, 111);
        }
        div[data-isSelect="false"] {
            border: 1px solid rgb(85, 196, 247);
            background-color: transparent;
        }
        .color-option {
            display: inline-block;
            border-radius: 100%;
            width: 30px;
            height: 30px;
            margin-left: 10px;
        }
        .color-option:hover {
            cursor: pointer;
            transform: scale(1.2);
            transition: all ease-in-out .2s;
        }
        #H99cc99 {
            border-radius: 100%;
            width: 20px;
            height: 20px;
            background-color: green;
        }
        #H6699cc {
            border-radius: 100%;
            width: 20px;
            height: 20px;
            background-color: rgb(9, 143, 201);
        }
        #Hcccc99 {
            border-radius: 100%;
            width: 20px;
            height: 20px;
            background-color: rgb(227, 183, 9);
        }
        #H000000 {
            border-radius: 100%;
            width: 20px;
            height: 20px;
            background-color: black;
        }
        #Hffffff {
            border-radius: 100%;
            width: 20px;
            height: 20px;
            background-color: white;
        }
        .font-options {
            display: inline-block;
        }
        .font-options img {
            width: 20px;
            height: 20px;
            margin-right: 20px;
        }
        .font-options img:hover {
            cursor: pointer;
            transform: scale(1.2) rotate(-15deg);
            transition: all ease-in-out .2s;
        }
        #save-box {
            position: absolute;
            display: inline-block;
            box-sizing: border-box;
            padding: 10px;
            width: 40px;
            height: 40px;
        }
        #issaved {
            position: absolute;
            opacity: 0;
            visibility: hidden;
            z-index: 0;
            transition: ease-in-out .5s;
        }
        #istyping {
            position: absolute;
            opacity: 0;
            visibility: hidden;
            z-index: 0;
        }
        #typing {
            opacity: 1;
            visibility: visible;
            z-index: 10;
            transition: ease-in-out .5s;
        }
        #saved {
            opacity: 0;
            visibility: visible;
            z-index: 10;
            animation: myfirst 1s;
            -webkit-animation: myfirst 1s;
            transition: ease-in-out .5s;
        }
        #delete-box {
            display: inline-block;
            box-sizing: border-box;
            width: 40px;
            height: 40px;
            padding: 10px;
            margin-left: 50px;
        }
        #delete:hover {
            cursor: pointer;
            transform: scale(1.2);
            transition: all ease-in-out .2s;
        }
        .right-container #nid-box {
            display: none !important;
        }
        @keyframes myfirst {
            0% {
                opacity: 0.5;
                width: 24px;
                height: 24px;
            }
            50% {
                opacity: 1;
                width: 28px;
                height: 28px;
                margin-top: -2px;
            }
            100% {
                opacity: 0;
                width: 24px;
                height: 24px;
            }
        }
        @-webkit-keyframes myfirst {
            0% {
                opacity: 0.5;
                width: 24px;
                height: 24px;
            }
            50% {
                opacity: 1;
                width: 28px;
                height: 28px;
                margin-top: -2px;
            }
            100% {
                opacity: 0;
                width: 24px;
                height: 24px;
            }
        }
        .content-wrapper #title {
            font-size: 24px;
            font-weight: bold;
            margin-top: 10px;
            width: 100%;
            border-style: none;
            outline: 0;
            background-color: inherit;
        }
        .content-wrapper #title:hover {
            cursor: text;
        }
        .content-wrapper #title::-webkit-input-placeholder {
            color: rgb(175, 175, 175);
        }
        .content-wrapper #content {
            height: 350px;
            width: 100%;
            margin-top: 30px;
            resize: none;
            font-size: 16px;
            font-family: 'PMingLiu';
            outline: 0;
            border-style: none;
            line-height: 30px;
            background-color: inherit;
            font-weight: normal;
            font-style: normal;
            text-decoration: none;
        }
        .content-wrapper #content:hover {
            cursor: text;
        }
    </style>
</head>
<body>
    <div class="notebook">
        <div class="container">
            <div class="left-container">
                <div class="left-top">
                    <div class="left-top-title">笔记</div>
                    <div class="ninfo-box">
                        <div class="ninfo-box-notenum">共<%=notenum %>个笔记</div>
                        <img src="/images/new.svg" class="ninfo-box-newnote"></img>
                    </div>
                </div>
                <div class="list-wrapper">
                    <% if ( ntDatas.length===0) { %>
                        <% } else { %>
                            <% ntDatas.forEach(function (data) {%>
                                <div id=li<%=data.id %> class="noteli">
                                    <div class="li-title">
                                        <%=data.title %>
                                    </div>
                                    <div class="li-date">
                                        <%=data.date %>
                                    </div>
                                </div>
                                <% }) %>
                                    <% } %>
                </div>
            </div>
            <div class="center-container">
                <div class="center-top">
                    <div class="center-top-uname">
                        <%=uname %>
                    </div>
                    <div class="center-top-uid">
                        <%=uid %>
                    </div>
                    <div class="center-top-logout">
                        <img src="/images/logout.svg"></img>
                        <span class="logoutBtn">退出登录</span>
                    </div>
                    <div class="center-top-about">
                        <img src="/images/about.svg"></img>
                        <a class="aboutBtn" href="https://gitee.com/vampurity">关于作者</a>
                    </div>
                </div>
                <div class="center-bottom">
                    <div class="center-bottom-title">待办</div>
                    <div class="tinfo-box">
                        <div class="tinfo-box-todonum">共<%=todonum %>个待办</div>
                        <img src="/images/new.svg" class="tinfo-box-newtodo"></img>
                    </div>
                    <input type="text" name="" class="tinfo-box-todotext" placeholder="请输入少于20字的内容">
                    <div class="btn-box">
                        <div class="doneBtn">
                            <img class="btnlogo" src="/images/done.svg"></img>
                            <div>已完成</div>
                        </div>
                        <div class="updoneBtn">
                            <img src="/images/updone.svg"></img>
                            <div>未完成</div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="right-container">
                <header>
                    <div class="setcolor">
                        <div class="color-option" id="H99cc99"></div>
                        <div class="color-option" id="H6699cc"></div>
                        <div class="color-option" id="Hcccc99"></div>
                        <div class="color-option" id="H000000"></div>
                        <div class="color-option" id="Hffffff"></div>
                    </div>
                    <div class="font-options">
                        <img src="/images/bold.svg" alt="" id="bold">
                        <img src="/images/itali.svg" alt="" id="itali">
                        <img src="/images/underline.svg" alt="" id="underline">
                    </div>
                    <div id="save-box">
                        <img src="/images/saved.svg" alt="" id="issaved" class="issaved">
                        <img src="/images/typing.svg" alt="" id="istyping" class="istyping">
                    </div>
                    <div id="nid-box"></div>
                    <div id="delete-box">
                        <img src="/images/delete.svg" alt="" id="delete">
                    </div>
                </header>
                <div class="content-wrapper">
                    <input type="text" placeholder="标题" id="title">
                    <textarea id="content" cols="30" rows="10"></textarea>
                </div>
            </div>
            <div class="todo-container">
                <div class="done-wrapper">
                    <% if ( doneDatas.length===0) { %>
                        <% } else { %>
                            <% doneDatas.forEach(function (data) {%>
                                <div id=li<%=data.id %> class="tdli-box">
                                    <div class="tdradio" id=td<%=data.id %> data-isSelect="true">
                                    </div>
                                    <div class="tdli">
                                        <%=data.content %>
                                    </div>
                                    <img src="/images/delete.svg" alt="" class="delete-todo" id=d-td<%=data.id %>>
                                </div>
                                <% }) %>
                                    <% } %>
                </div>
                <div class="updone-wrapper">
                    <% if ( updoneDatas.length===0) { %>
                        <% } else { %>
                            <% updoneDatas.forEach(function (data) {%>
                                <div id=li<%=data.id %> class="tdli-box">
                                    <div class="tdradio" id=td<%=data.id %> data-isSelect="false">
                                    </div>
                                    <div class="tdli">
                                        <%=data.content %>
                                    </div>
                                    <img src="/images/delete.svg" alt="" class="delete-todo" id=d-td<%=data.id %>>
                                </div>
                                <% }) %>
                                    <% } %>
                </div>
            </div>
        </div>
    </div>
    <script src="/javascripts/home.js" type="module"></script>
    <script src="/javascripts/message.min.js"></script>
</body>
</html>